home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / August 96 / Re Focus Sets, FW_CFrame Priv < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.4 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Focus Sets, FW_CFrame::PrivActivateFrame
  2. Sent:        8/5/96 8:44 AM
  3. Received:    8/5/96 9:01 AM
  4. From:        Henri Lamiraux, lamiraux@apple.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. Did you try overridding FW_CFrame::RequestFocusSet and doing there what 
  9. you are currently doing in your PrivActivateFrame override? 
  10. FW_CFrame::RequestFocusSet is already virtual and non-priv.   
  11.  
  12. ----------------------------------------------------------
  13.  
  14. >Hi again,
  15. >
  16. >I've got the best solution I can find to my focus set problem. Recall, my
  17. >frame has a dynamic focus set, like ODF Button, but must also allow access
  18. >to an embedded part. Further, my frame may lose selection focus to modal
  19. >dialog frames that it spawns, but needs to recover these focii when the
  20. >dialogs are dismissed.
  21. >
  22. >The best way I've found to do this is to make FW_CFrame::PrivActivateFrame
  23. >virtual and override it to update a data member which is returned by the
  24. >GetFocusSet function. I keep two such data members: fCurrentFocusSet and
  25. >fDesiredFocusSet. In my PrivActivateFrame override, I set fCurrentFocusSet
  26. >to fDesiredFocusSet, and in my FW_CFrame::GetFocusSet override, I return
  27. >fCurrentFocusSet. Everything stays in synch, and I think I'm approaching an
  28. >acceptable HI for the focus behavior.
  29. >
  30. >** Requests **
  31. >
  32. >1. Could all "Priv" members of framework level classes be made virtual with
  33. >the warning that if we developers exploit that, we're asking for trouble?
  34. >There is quite a lot of behavior in those methods that may need to be
  35. >overridden from time to time.
  36. >
  37. >2. Could there be a framework level "FW_CFocusManager" class which
  38. >abstracts the current focus behavior away from the event handling? It would
  39. >theoretically make it much easier to complicated control frames that
  40. >dynamically  adjust their focus sets.
  41. >
  42. >Happy MacWorld!
  43. >
  44. >Brad
  45. >
  46. ><mailto: "Brad Hutchings" brad@hutchings-software.com>
  47. ><http://www.hutchings-software.com>
  48. >
  49. >Got OpenDoc? Got Cyberdog? Then beta-test Rapid-I Button! Email me for more
  50. >information...
  51. >
  52. >
  53.  
  54.  
  55. ........................................................................
  56.  Henri Lamiraux                                      lamiraux@apple.com
  57.  Apple Computer, Inc.                 OpenDoc(tm) Development Framework
  58. ........................................................................
  59.  
  60.  
  61.